package de.mindshareprojects.datawarehouse.client;


import java.util.ArrayList;

import com.google.gwt.user.client.rpc.AsyncCallback;

import de.mindshareprojects.datawarehouse.shared.Advertiser;
import de.mindshareprojects.datawarehouse.shared.Campaign;
import de.mindshareprojects.datawarehouse.shared.WebAnalyticsLineItem;

public interface DataServiceAsync {
	
	void createCampaign(Campaign campaign, AsyncCallback<Campaign> callback)
	throws IllegalArgumentException;

	void createAdvertiser(Advertiser advertiser, AsyncCallback<Advertiser> callback)
	throws IllegalArgumentException;

	void getAdvertisers(AsyncCallback<ArrayList<Advertiser>> callback);
	void getAdvertiser(Long advertiserKey, AsyncCallback<Advertiser> callback);
	
	void getCampaigns(AsyncCallback<ArrayList<Campaign>> callback);
	void getCampaignsByCountry(String country, AsyncCallback<ArrayList<Campaign>> callback);
	void getCampaignsByAdvertiser(Long advertiserKey, AsyncCallback<ArrayList<Campaign>> callback);
	
	void createWebAnalyticsLineItem(WebAnalyticsLineItem webAnalyticsLineItem, AsyncCallback<WebAnalyticsLineItem> callback)
	throws IllegalArgumentException;
	
	void getWebAnalyticsLineItemsByAdvertiserGroup(Long groupKey, AsyncCallback<ArrayList<WebAnalyticsLineItem>> callback);

	void getWebAnalyticsLineItems(AsyncCallback<ArrayList<WebAnalyticsLineItem>> callback);

	void checkIfLineItemsExist(Long campaignKey, AsyncCallback<Boolean> callback);

	void deleteCampaignItems(Long campaignKey, AsyncCallback<Boolean> callback);

	void saveAllWebAnalyticsLineItems(
			ArrayList<WebAnalyticsLineItem> itemsToSave,
			AsyncCallback<Boolean> callback);

	void saveAllAdvertisers(ArrayList<Advertiser> itemsToSave,
			AsyncCallback<Boolean> callback);

	void saveAllCampaigns(ArrayList<Campaign> itemsToSave,
			AsyncCallback<Boolean> callback);

	void getCampaignsByAdvertiserGroup(Long groupKey,String country,
			AsyncCallback<ArrayList<Campaign>> callback);

	void saveAdvertiser(Advertiser advertiser, AsyncCallback<Boolean> callback);

	void getWebAnalyticsAdvertisers(
			AsyncCallback<ArrayList<Advertiser>> callback);

	void getAdvertisersByCountry(String country,
			AsyncCallback<ArrayList<Advertiser>> callback);

	void getUploadURL(String urlRedirect, AsyncCallback<String> callback);

}